<!DOCTYPE html>

<html>
<head>
    <style>
        body {
            -webkit-perspective: 500px;
        }
        #card {
            position: relative;
            height: 300px;
            width: 200px;
            transition: -webkit-transform, 1s;
            -webkit-transform-style: preserve-3d;
        }
        
        .face {
            position: absolute;
            top: 0; left: 0;
            width: 100%;
            height: 100%;
            background-color: silver;
            border-radius: 40px;
            padding: 20px;
            -webkit-backface-visibility: hidden;
        }
        
        .back {
            -webkit-transform: rotateY(180deg);
            -moz-transform: rotateY(180deg);
            -ms-transform: rotateY(180deg);
            -o-transform: rotateY(180deg);
            transform: rotateY(180deg);
        }
        
        #card.flipped {
            -webkit-transform: rotateY(180deg);
        }
    </style>
</head>
<body>

    <div id="card" onclick="this.classList.toggle('flipped')">
        <div class="front face">
            Front
        </div>
        <div class="back face">
            Back
        </div>
    </div>
</body>
</html>
